$(function () {
    getnewsinfo();
})

function getnewsinfo() {
    $.ajax({
        url:requestUrl+"app/commonProblem/detail.do",
        type:"POST",
        data:{id:GetQueryString("name")},
        dataType:"JSON",
        success:function (json) {
            if (json.code==0){
            var div = $("<div class='wjwttitle'>"+json.data[0].name+"</div><div class='wjwtnr'>"+json.data[0].content+"</div>").appendTo(".cjwt-all");
            }else{
                alert(json.message);
            }
        }
    })
}

function GetQueryString(name)
{
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}